Optimal. Leaf size=51 \[ \frac {(a+b)^2 \tan (e+f x)}{f}-\frac {1}{2} b x (4 a+3 b)+\frac {b^2 \sin (e+f x) \cos (e+f x)}{2 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3191, 390, 385, 203} \[ \frac {(a+b)^2 \tan (e+f x)}{f}-\frac {1}{2} b x (4 a+3 b)+\frac {b^2 \sin (e+f x) \cos (e+f x)}{2 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 385
Rule 390
Rule 3191
Rubi steps
\begin {align*} \int \sec ^2(e+f x) \left (a+b \sin ^2(e+f x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+(a+b) x^2\right )^2}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \left ((a+b)^2-\frac {b (2 a+b)+2 b (a+b) x^2}{\left (1+x^2\right )^2}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a+b)^2 \tan (e+f x)}{f}-\frac {\operatorname {Subst}\left (\int \frac {b (2 a+b)+2 b (a+b) x^2}{\left (1+x^2\right )^2} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {b^2 \cos (e+f x) \sin (e+f x)}{2 f}+\frac {(a+b)^2 \tan (e+f x)}{f}-\frac {(b (4 a+3 b)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{2 f}\\ &=-\frac {1}{2} b (4 a+3 b) x+\frac {b^2 \cos (e+f x) \sin (e+f x)}{2 f}+\frac {(a+b)^2 \tan (e+f x)}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.31, size = 48, normalized size = 0.94 \[ \frac {-2 b (4 a+3 b) (e+f x)+4 (a+b)^2 \tan (e+f x)+b^2 \sin (2 (e+f x))}{4 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 68, normalized size = 1.33 \[ -\frac {{\left (4 \, a b + 3 \, b^{2}\right )} f x \cos \left (f x + e\right ) - {\left (b^{2} \cos \left (f x + e\right )^{2} + 2 \, a^{2} + 4 \, a b + 2 \, b^{2}\right )} \sin \left (f x + e\right )}{2 \, f \cos \left (f x + e\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.19, size = 99, normalized size = 1.94 \[ \frac {2 \, a^{2} \tan \left (f x + e\right ) + 4 \, a b \tan \left (f x + e\right ) + 2 \, b^{2} \tan \left (f x + e\right ) - {\left (4 \, a b + 3 \, b^{2}\right )} {\left (f x - \pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor + e\right )} + \frac {b^{2} \tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1}}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.62, size = 87, normalized size = 1.71 \[ \frac {a^{2} \tan \left (f x +e \right )+2 a b \left (\tan \left (f x +e \right )-f x -e \right )+b^{2} \left (\frac {\sin ^{5}\left (f x +e \right )}{\cos \left (f x +e \right )}+\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )-\frac {3 f x}{2}-\frac {3 e}{2}\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.46, size = 74, normalized size = 1.45 \[ -\frac {4 \, {\left (f x + e - \tan \left (f x + e\right )\right )} a b + {\left (3 \, f x + 3 \, e - \frac {\tan \left (f x + e\right )}{\tan \left (f x + e\right )^{2} + 1} - 2 \, \tan \left (f x + e\right )\right )} b^{2} - 2 \, a^{2} \tan \left (f x + e\right )}{2 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 14.09, size = 74, normalized size = 1.45 \[ \frac {\mathrm {tan}\left (e+f\,x\right )\,{\left (a+b\right )}^2}{f}+\frac {b^2\,\sin \left (2\,e+2\,f\,x\right )}{4\,f}-\frac {b\,\mathrm {atan}\left (\frac {b\,\mathrm {tan}\left (e+f\,x\right )\,\left (4\,a+3\,b\right )}{2\,\left (\frac {3\,b^2}{2}+2\,a\,b\right )}\right )\,\left (4\,a+3\,b\right )}{2\,f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin ^{2}{\left (e + f x \right )}\right )^{2} \sec ^{2}{\left (e + f x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________